const db = require("../common/mysql");

const addUserInfo = ({ name, sex, remark }) => {
  return new Promise((resolve, reject) => {
    db.query(`INSERT INTO user (name,sex,remark) VALUES ('${name}',${sex},'${remark}')`, (err, rows) => {
      if (!err) {
        resolve('添加成功')
      } else {
        resolve('添加失败')
      }
    })
  })
}

module.exports = {
  addUserInfo
}
